package com.danbay.cloud.device.api.service;

import com.danbay.cloud.device.api.dto.DeviceLoginDto;
import com.danbay.framework.exception.BusinessException;
import com.danbay.framework.springnc.annotation.AutoController;
import com.danbay.framework.springnc.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 *
 * @author SJG
 * 2017/10/23
 * 设备登录接口
 */
@AutoController
@RequestMapping("/device-service/device")
public interface IDeviceLoginService {

    /**
     * 设备登录，每次入网后都需要登录
     * @param loginDto
     * @throws BusinessException
     */
    @RequestMapping("/login")
    void login(@RequestBody DeviceLoginDto loginDto) throws BusinessException;

    /**
     * 设备登出，中控检测到设备连不上后，需要向云端发起设备登出
     * @param loginDto
     * @throws BusinessException
     */
    @RequestMapping("/logout")
    void logout(@RequestBody DeviceLoginDto loginDto) throws BusinessException;
}
